import Vue from "vue";
import VueRouter from "vue-router";
import { routes } from "./path";
Vue.use(VueRouter);

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});
/*
不需要登录的地址
*/
const filterPath=[
  '/login',
]

router.beforeEach((to,from,next)=>{
    next()
})

export default router;
